A conventionally known method of ensuring that an application program that stores confidential data, such as an authentication key, is not analyzed by a malicious third party (hereinafter, “attacker”), is to protect the application program with a tamper resistant module. The tamper resistant module is normally provided on the device as hardware and protects application programs. However, in light of how new attack methods are continually being proposed these days, it is preferable to protect application programs with software, i.e. with a computer program that can easily be updated to respond flexibly to new attack methods.
Technology to protect application programs via software includes verification of tampering using hash values. Another example is a decryption loading function, whereby application programs are encrypted and stored when not in use. Encrypted application programs are decrypted and loaded into memory only when used.
Even when using such technology, however, the software that is used to protect application programs (hereinafter, a “protection control module”) may itself be subject to attack. If the protection control module is tampered with, application programs are also exposed to attack.
Patent Literature 1 discloses technology for preventing changes to a program that reliably precludes execution of a program that has been tampered with even when changes occur in a check program that checks whether another program has changed. With this technology, a plurality of check programs that monitor changes in other programs are provided in a computer program, with each check program monitoring one or more of the other check programs. The following is a brief description of this technology.
With this technology, two monitoring modules A and B monitor each other. The monitoring modules A and B respectively include programs that are to be protected from tampering by an attacker (main programs A and B), programs for detecting tampering in other modules (check programs A and B), and information necessary for the check programs to detect tampering (check information A and B). Check program A uses check information A to detect whether the main program B and the check program B in the monitoring module B have been tampered with. Furthermore, check program B uses check information B to detect whether the main program A and the check program A in the monitoring module A have been tampered with. The monitoring modules thereby detect whether each other's main program and check program have been tampered with.